home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / tjgold.zip / INSTALL.003 / DEMCALC4.PAS < prev    next >
Pascal/Delphi Source File  |  1995-05-29  |  2KB  |  64 lines

  1. {--------------------------------------------------------------------------}
  2. {                Product: TechnoJock's Turbo Toolkit GOLD                  }
  3. {                                                                          }
  4. {                     TTT GOLD - DEMO PROGRAM                        }
  5. {                                                                          }
  6. {                Copyright 1986-1995  TechnoJock Software, Inc.            }
  7. {                           All Rights Reserved                            }
  8. {                          Restricted by License                           }
  9. {--------------------------------------------------------------------------}
  10.  
  11. {Description: DEMCALC4.PAS
  12.               Customizing the calculator display colors.
  13. }
  14.  
  15. program DemCalc4;
  16.  
  17. uses CRT, DOS, GoldMisc, GoldAttr, GoldCalc, GoldFast, GoldKey, GoldTint,
  18.                GoldStr, GoldWin;
  19.  
  20. var Answer: real;
  21.  
  22. procedure SetScreen;
  23. {Paints the background}
  24. begin
  25.    Clear(WhiteonBlue,' ');
  26.    ClearLine(1,BlackOnRed);
  27.    ClearLine(2,BlackOnRed);
  28.    WriteAT(1,3,BlueOnRed,replicate(80,'▄'));
  29.    WriteAT(68,3,WhiteOnBlack,' TTT Gold! ');
  30.    ClearLine(25,LightgrayOnRed);
  31.    WriteCenter(25,0,'Press ESC to finish...');
  32. end; {SetScreen}
  33.  
  34. procedure CustomizeColors;
  35. {}
  36. begin
  37.    GoldSetColor(CalcBorder,WhiteOnMagenta);
  38.    GoldSetColor(CalcBody,WhiteOnMagenta);
  39.    GoldSetColor(CalcIcons,GreenOnMagenta);
  40.    GoldSetColor(CalcTitle,YellowOnMagenta);
  41.    GoldSetColor(CalcInput,BlackOnLightgray);
  42.    GoldSetColor(CalcOperand,LightgrayOnMagenta);
  43.    GoldSetColor(CalcTape,GreenOnMagenta);
  44.    GoldSetColor(CalcButtons,WhiteOnGreen);
  45. end; { CustomizeColors }
  46.  
  47. begin { main }
  48. {$IFOPT D+}
  49.    HeapRecord;
  50. {$ENDIF}
  51.    SetScreen;
  52.    CustomizeColors;
  53.    CursorOff;
  54.    MouseShow(true);
  55.    Answer := RunCalculator(' Ugly Calculator ');
  56.    if LastCalcError <> 0 then
  57.       PromptOK(' Error ','Not enough memory to display calculator');
  58.   ResetStartupMode;
  59.    writeln(Answer:10:2);
  60. {$IFOPT D+}
  61.    HeapCheck;
  62. {$ENDIF}
  63. end.
  64.